FROM node:8-alpine as saas-fe-builder
ADD ./package.json /apps/
WORKDIR /apps
RUN npm --registry https://registry.npm.taobao.org info underscore && npm install
COPY ./ /apps
RUN npm run release

FROM nginx:alpine
COPY --from=saas-fe-builder /apps/dist/ /usr/share/nginx/html/
